From: Jo-Philipp Wich Date: Tue, 30 Apr 2019 07:08:56 +0000 (+0200) Subject: luci-app-statistics: escape backslashes as well X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=3b379f01b52ec1150662f707864608e3e0f51c3f;p=project%2Fluci.git luci-app-statistics: escape backslashes as well Fixes: bab4a3ef ("luci-app-statistics - allow rrd files to contain :") Signed-off-by: Jo-Philipp Wich --- diff --git a/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua b/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua index 29090eed8f..4586b23caa 100644 --- a/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua +++ b/applications/luci-app-statistics/luasrc/statistics/rrdtool.lua @@ -62,7 +62,7 @@ function Graph._mkpath( self, plugin, plugin_instance, dtype, dtype_instance ) end function Graph.mkrrdpath( self, ... ) - return string.format( "%s/%s.rrd", self.opts.rrdpath, string.gsub(self:_mkpath( ... ), ":", "\\:") ) + return string.format( "%s/%s.rrd", self.opts.rrdpath, self:_mkpath( ... ):gsub("\\", "\\\\"):gsub(":", "\\:") ) end function Graph.mkpngpath( self, ... )